{extend name="common/layout"}
{block name="title"}品牌列表{/block}
{block name="content"}
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <a href="{:url('set')}" data-toggle="tooltip" title="新增" class="btn btn-primary  "> <i
                        class="fa fa-plus"></i>
                </a>
                <button type="button" data-toggle="tooltip" title="删除" class="btn btn-danger"
                        onclick="confirm('确认？') ? $('#form-index').submit() : false;">
                    <i class="fa fa-trash-o"></i>
                </button>
            </div>
            <h1>品牌管理</h1>
            <ul class="breadcrumb">
                <li>
                    <a href="/back/site/index.html">首页</a>
                </li>
                <li>
                    <a href="/back/brand/index.html">品牌管理</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <i class="fa fa-list"></i>
                    品牌列表
                </h3>
            </div>
            <div class="panel-body">
                <form action="{:url('index')}" method="get">
                    <div class="well">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="control-label" for="input-filter-title">品牌</label>
                                    <input type="text" name="filter[title]" value="{$filter['title']|default=''}"
                                           placeholder="品牌" id="input-filter-title" class="form-control"/>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="control-label" for="input-filter_site">官网</label>
                                    <input type="text" name="filter[site]" value="{$filter['site']|default=''}"
                                           placeholder="官网" id="input-filter_site" class="form-control"/>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <!--<div class="col-sm-6">-->
                            <!--<div class="form-group">-->
                            <!--<label class="control-label" for="input-filter-fuzzy">模糊搜索-->
                            <!--<input type="checkbox" name="filter[fuzzy]" value="1" id="input-filter-fuzzy" class="form-control" />-->
                            <!--</label>-->
                            <!--</div>-->
                            <!--</div>-->
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <button type="submit" id="button-filter" class="btn btn-primary pull-right">
                                    <i class="fa fa-search"></i>
                                    筛选
                                </button>
                            </div>
                        </div>
                    </div>
                </form>

                <form action="{:url('multi')}" method="post" enctype="multipart/form-data" id="form-index">

                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td style="width: 1px;" class="text-center">
                                    <input type="checkbox"
                                           onclick="$('input[name=\'selected[]\']').prop('checked', this.checked);"/>
                                </td>
                                <td class="text-center">Logo</td>
                                <td class="text-left">
                                    <a href="{:myUrl('index',$filter_order,$order,'title')}"
                                       class="{:myClassStyle($order,'title')}">品牌</a>
                                </td>
                                <td class="text-left">
                                    <a href="{:myUrl('index',$filter_order,$order,'site')}"
                                       class="{:myClassStyle($order,'site')}">官网</a>
                                </td>
                                <td class="text-right">
                                    <a href="{:myUrl('index',$filter_order,$order,'sort')}"
                                       class="{:myClassStyle($order,'sort')}">排序</a>
                                </td>
                                <td class="text-right">管理</td>
                            </tr>
                            </thead>
                            <tbody>
                            {if count($list)!=0}
                            {volist name='list' id='item'}
                            <tr>
                                <td class="text-center">
                                    <input type="checkbox" name="selected[]" value="{$item.id|default=''}"/>
                                </td>
                                <td class="text-center">
                                    <img src="/upload/brand/{$item.logo}" alt="Logo" class="img-thumbnail" style="max-width: 40px"/>
                                </td>
                                <td class="text-left">{$item->title}</td>
                                <td class="text-left">{$item["site"]}</td>
                                <td class="text-right">{$item["sort"]}</td>
                                <td class="text-right">
                                    <a href="{:url('set',['id'=>$item.id])}" data-toggle="tooltip" title="编辑"
                                       class="btn btn-primary ">
                                        <i class="fa fa-pencil"></i>
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {else/}
                            <td class="text-center" colspan="6">暂无数据</td>
                            {/if}

                            </tbody>
                        </table>
                    </div>
                </form>
                <div class="row">
                    <div class="col-sm-6 text-left">
                        {$list->render()}
                    </div>
                    <div class="col-sm-6 text-right">显示开始 {$start} 到 {$end} （总
                        {$list->lastPage()}页）
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


{/block}
